<wxs module="dateFr" src="../../js/filter.wxs"></wxs>
<import src="../detail/detail" />
<template is="{{template}}" data="{{my_toast_tip: my_toast_tip}}" />
<!-- 浮层 -->
<view id='float_view' wx:if="{{showFloat}}" bindtap='hideOrder'></view>
<!-- 订单确认页 -->
<view id='oderView' wx:if="{{showOrdermsg}}">
      <label class="oderView_title">订单确认</label>
      <div><label>{{orderMsgaddress}}:</label><span>{{orderMsgaddressNote}}</span></div>
      <div><label>{{orderMsgTime}}:</label><span>{{dateFr.filterTime2(orderMsgTimeNote)}}</span></div>
      <label class="oderView_msg">请在商城开放时间完成订餐操作，如在关闭时间订餐，选择的时间会在下次开店时间内生效</label>
      <label class="makeSure" bindtap='payMakersure'>确定</label>
</view>      

<!-- 自定义支付类型选择 -->
<view id='pay_picker' wx:if='{{showPayPick}}'>
    <label bindtap='cancelPayAction'>选择支付方式
        <image  src="{{imageUrl}}/meal_icon_delete.png"></image>
    </label>
    <label bindtap='choosePatType' data-code='0'>
        <image class='logo_style' src="{{urlAddress}}/pay_balance.png"></image><span>余额剩余:{{balance}}元</span>
        <image wx:if='{{payType=="4"}}' class='select_styles' src="{{urlAddress}}/pay_select.png"></image>
        <image wx:if='{{payType=="11"}}' class='select_styles' src="{{urlAddress}}/pay_unselect.png"></image>
    </label>
    <view class="line"></view> 
    <label bindtap='choosePatType' data-code='1'>
        <image class='logo_style' src="{{urlAddress}}/icon_wechat.png"></image><span>微信支付</span>
        <image wx:if='{{payType=="11"}}' class='select_styles' src="{{urlAddress}}/pay_select.png"></image>
        <image wx:if='{{payType=="4"}}' class='select_styles' src="{{urlAddress}}/pay_unselect.png"></image>
    </label>
</view>
<!-- 页面 -->
<view id='payView'>
    <!-- <image class='bg_style' src="{{imageUrl}}/reserveBackground.png" /> -->
    <view id='topView'>
        <view id='menu' >
            
            <label  wx:if='{{orderInfo.reserveOrderVo.deliveryModel==20}}'  class='menu_unstyle' >外卖配送</label>
            <label  wx:if='{{orderInfo.reserveOrderVo.deliveryModel==10}}' class='menu_unstyle' >到店自提</label>
        </view>
        <view id='changeView'>
           <view id='getSelf' >
                <view class='address_view'>
                    <image src="{{urlAddress}}/mxShop.png" />
                    <label wx:if='{{orderInfo.reserveOrderVo.deliveryModel==10}}'>自提地址</label>
                     <label wx:else>配送地址</label>
                    <label>
                        <!-- <p wx:if='{{orderInfo.reserveOrderVo.deliveryModel==20}}'> -->{{orderInfo.reserveOrderVo.fixedAddress}}
                        <!-- </p> -->
                    <p wx:if='{{orderInfo.reserveOrderVo.deliveryModel==20}}'> 
                    {{orderInfo.reserveOrderVo.deliveryAddress}}</p>
                     </label>
                </view>
                <view class='line_s'><label></label></view>
                <view class='time_view'>
                    <image src="{{imageUrl}}/meal_icon_time.png" />
                    <label wx:if='{{orderInfo.reserveOrderVo.deliveryModel==10}}'>自提时间</label>
                     <label wx:else>配送时间</label>
                    <label>
                        <view  class='blue_style'>
                            {{dateFr.filterTime2(orderInfo.reserveOrderVo.pickupTime)}}
                        </view>
                        <image class="icon" src='{{urlAddress}}/icon_next.png'></image>
                    </label>
                </view>
            </view> 

            <!-- <view id='getWait' wx:if='{{orderInfo.reserveOrderVo.deliveryModel==20}}'>
                <view class='address_view'>
                    <image src="{{imageUrl}}/meal_icon_location2.png" />
                    <label>配送地址</label>
                    <label>
                        <view >
                             <navigator class='blue_style' url='/pages/reserveAddress/reserveAddress'  hover-class="none">
                            {{chooseAddress||"请选择"}}
                             </navigator>
                        </view>
                        <image class="icon" src='{{urlAddress}}/icon_next.png'></image>
                    </label>
                   
                </view>
                <view class='line_s'><label></label></view>
                <view class='time_view'>
                    <image src="{{imageUrl}}/meal_icon_time.png" />
                    <label>配送时间</label>
                    <label>
                        <view bindtap='timePickerAction' class='blue_style'>
                            {{peisongTime}}
                        </view>
                        <image class="icon" src='{{urlAddress}}/icon_next.png'></image>
                    </label>
                </view>
            </view> -->
            <view id='waitSend'>
            </view>
        </view>
    </view>
     <!-- <view id='goods' style='top:{{goodsPosition}}'> -->
    <view id='goods' >
        <view class='items_style' wx:for="{{orderInfo.orderGoods}}" wx:key="{{index}}">
            <image wx:if="{{item.imgUrl==null}}" src="{{urlAddress}}/xiaomai.jpg" />
            <image wx:if="{{item.imgUrl!=null}}" class='market_style' src="{{item.imgUrl}}" />
            <label class="goods_num">×{{item.num}}</label>
            <label class="goods_name">{{item.goodsName}}</label>
            <label class="goods_money"><span wx:if='{{item.originalPrice!=item.price}}'>¥{{item.originalPrice}}<view wx:if='{{item.originalPrice!=item.price}}' class="line"></view></span><p>¥{{item.price}}</p></label>
        </view>
        <view class='line_l'><label></label></view>
        <view id='preferential'>
            <view class='p_items' bindtap="goSelect">
                <label class="p_name"><span>券</span>优惠券</label>
                <label class="p_money">
                    <label>-¥{{orderInfo.showCouponPrice}}</label>
                    <image class="icon" src='{{urlAddress}}/icon_next.png'></image>
                </label>
            </view>
            <view class='p_items'>
                <label class="p_name"><span>促</span>促销活动</label>
                <label class="p_money">
                    <label>-¥{{orderInfo.vipsavingPrice}}</label>
                    <image class="icon" src='{{urlAddress}}/icon_next.png' style='opacity: 0;'></image>
                </label>
            </view>
            <!-- 麦享 -->
           <!--   <view class="bottom" bindtap="goOpenMx" wx:if='{{supportMx!=3}}'>
                <label id='mx_style'><p>麦享会员</p>
                    <span wx:if='{{supportMx==2&mxCheaper}}'>再减¥{{mxSavingAmount}}</span>
                    <span wx:if='{{supportMx==2&!mxCheaper}}'>{{mxDisountRate*10}}折</span>
                </label>
                <view>
                    <text wx:if='{{supportMx==1}}'>-￥{{util.formatNum(mxSavingAmount)?util.formatNum(mxSavingAmount):0}}</text>
                    <image wx:if="{{!code}}" mode="aspectFit" class="icon"  src='{{imageUrl}}/icon_next.png'></image>
                </view>
            </view>
 -->
            
        </view>
        <view id='order_msg'>
            <!-- <navigator class='' url='/pages/reserveNote/reserveNote'  hover-class="none"> -->
            <view class='p_items'>
                
                <label class="p_name">订单备注</label>
                
                <label class="p_msg">
                    <label>{{orderInfo.reserveOrderVo.remark||"无"}}</label>
                    <image class="icon" src='{{urlAddress}}/icon_next.png'></image>
                </label>
            </view>
            <!-- </navigator> -->
            <view class='line_l'><label></label></view>
            <view class='p_items'>
                <label class="p_name">支付方式</label>
                <label class="p_money" bindtap='payPickerAction'>
                    <label>{{payText}}</label>
                    <image class="icon" src='{{urlAddress}}/icon_next.png'></image>
                
                </label>
            </view>
        </view>
        <view class='ding'>
        </view>
    </view>
    <view id='pay_bottom'>
        <label>¥{{orderInfo.price}}<span>已优惠¥{{orderInfo.savingPrice}}</span></label>
        <label bindtap='payAction'>立即支付</label>
    </view>
     <!--密码--> 
  <view id='passWord_view' wx:if="{{isShow}}">
    <view id='pw'>
        <image class='clo_style' bindtap="closeView" src="../../image/icon_clo.png"></image>
        <input type="number" bindblur='hideView'   placeholder="这是一个可以自动聚焦的input" focus='{{input_type}}' bindinput="getPassWord"/>
        <label class="msg" >请输入余额支付密码</label>
        <label class="point" >
            <li wx:for="{{styleList}}" wx:key='{{index}}'><span class="{{item}}"></span></li>
            
        </label>
    </view>
</view> 
</view>